/**
 * 暗黑模式存储 - ok
 * @author shenyc
 */
import { ref, computed } from "vue";
import { defineStore } from "pinia";
import { useI18n } from "vue-i18n";
import { useDark, useToggle } from "@vueuse/core";

/** @deprecated */
export const useDarkStore = defineStore("darkStore", () => {
    const isDark = ref(useDark());
    const toggleDark = useToggle(isDark);

    const { t } = useI18n();
    function comment() {
        return t("zdemo.switchDarkMode");
    }

    return { isDark, toggleDark, comment };
});
